import dao.ManyDAO;
import dao.OneDAO;
import model.Many;
import model.One;
import org.apache.commons.io.IOUtils;

import java.security.MessageDigest;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        // Many{idMany=3, name='3_1', one=One{idOne=1, name='3_1', manies=[]}} , т.к. many не достает List<Many> из one
        ManyDAO manyDAO = new ManyDAO();
        Many many = manyDAO.getManyById(3);
        System.out.println(many);

        //One{idOne=1, name='1', manies=[Many{idMany=1, name='1', one=One{idOne=0, name='null', manies=[]}}, Many{idMany=2, name='1', one=One{idOne=0, name='null', manies=[]}}, Many{idMany=3, name='1', one=One{idOne=0, name='null', manies=[]}}]}
        //вместо many.name выводятся one.name
        OneDAO oneDAO = new OneDAO();
        One one = oneDAO.getOneById(1);
        System.out.println(one);

    }
}
